<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-- Note: this file derives from old-locale:System.Locale.hs, which is copyright (c) The University of Glasgow 2001</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Time.Format.Locale</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span>    </span><span class="annot"><a href="Data.Time.Format.Locale.html#TimeLocale"><span class="hs-identifier">TimeLocale</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-6"></span><span>
</span><span id="line-7"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Time.Format.Locale.html#defaultTimeLocale"><span class="hs-identifier">defaultTimeLocale</span></a></span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Time.Format.Locale.html#iso8601DateFormat"><span class="hs-identifier">iso8601DateFormat</span></a></span><span>
</span><span id="line-10"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Time.Format.Locale.html#rfc822DateFormat"><span class="hs-identifier">rfc822DateFormat</span></a></span><span>
</span><span id="line-11"></span><span>    </span><span class="hs-special">)</span><span>
</span><span id="line-12"></span><span class="hs-keyword">where</span><span>
</span><span id="line-13"></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Time.LocalTime.Internal.TimeZone.html"><span class="hs-identifier">Data.Time.LocalTime.Internal.TimeZone</span></a></span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span class="hs-keyword">data</span><span> </span><span id="TimeLocale"><span class="annot"><a href="Data.Time.Format.Locale.html#TimeLocale"><span class="hs-identifier hs-var">TimeLocale</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="TimeLocale"><span class="annot"><a href="Data.Time.Format.Locale.html#TimeLocale"><span class="hs-identifier hs-var">TimeLocale</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-18"></span><span>        </span><span class="hs-comment">-- |full and abbreviated week days, starting with Sunday</span><span>
</span><span id="line-19"></span><span>        </span><span id="wDays"><span class="annot"><span class="annottext">TimeLocale -&gt; [(String, String)]
</span><a href="Data.Time.Format.Locale.html#wDays"><span class="hs-identifier hs-var hs-var">wDays</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>        </span><span class="hs-comment">-- |full and abbreviated months</span><span>
</span><span id="line-21"></span><span>        </span><span id="months"><span class="annot"><span class="annottext">TimeLocale -&gt; [(String, String)]
</span><a href="Data.Time.Format.Locale.html#months"><span class="hs-identifier hs-var hs-var">months</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>        </span><span class="hs-comment">-- |AM\/PM symbols</span><span>
</span><span id="line-23"></span><span>        </span><span id="amPm"><span class="annot"><span class="annottext">TimeLocale -&gt; (String, String)
</span><a href="Data.Time.Format.Locale.html#amPm"><span class="hs-identifier hs-var hs-var">amPm</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>        </span><span class="hs-comment">-- |formatting strings</span><span>
</span><span id="line-25"></span><span>        </span><span id="dateTimeFmt"><span class="annot"><span class="annottext">TimeLocale -&gt; String
</span><a href="Data.Time.Format.Locale.html#dateTimeFmt"><span class="hs-identifier hs-var hs-var">dateTimeFmt</span></a></span></span><span class="hs-special">,</span><span> </span><span id="dateFmt"><span class="annot"><span class="annottext">TimeLocale -&gt; String
</span><a href="Data.Time.Format.Locale.html#dateFmt"><span class="hs-identifier hs-var hs-var">dateFmt</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>        </span><span id="timeFmt"><span class="annot"><span class="annottext">TimeLocale -&gt; String
</span><a href="Data.Time.Format.Locale.html#timeFmt"><span class="hs-identifier hs-var hs-var">timeFmt</span></a></span></span><span class="hs-special">,</span><span> </span><span id="time12Fmt"><span class="annot"><span class="annottext">TimeLocale -&gt; String
</span><a href="Data.Time.Format.Locale.html#time12Fmt"><span class="hs-identifier hs-var hs-var">time12Fmt</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>        </span><span class="hs-comment">-- |time zones known by name</span><span>
</span><span id="line-28"></span><span>        </span><span id="knownTimeZones"><span class="annot"><span class="annottext">TimeLocale -&gt; [TimeZone]
</span><a href="Data.Time.Format.Locale.html#knownTimeZones"><span class="hs-identifier hs-var hs-var">knownTimeZones</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Data.Time.LocalTime.Internal.TimeZone.html#TimeZone"><span class="hs-identifier hs-type">TimeZone</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-29"></span><span>        </span><span class="hs-special">}</span><span> </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679072206"><span id="local-6989586621679072220"><span class="annot"><span class="annottext">TimeLocale -&gt; TimeLocale -&gt; Bool
(TimeLocale -&gt; TimeLocale -&gt; Bool)
-&gt; (TimeLocale -&gt; TimeLocale -&gt; Bool) -&gt; Eq TimeLocale
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: TimeLocale -&gt; TimeLocale -&gt; Bool
$c/= :: TimeLocale -&gt; TimeLocale -&gt; Bool
== :: TimeLocale -&gt; TimeLocale -&gt; Bool
$c== :: TimeLocale -&gt; TimeLocale -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679072158"><span id="local-6989586621679072160"><span id="local-6989586621679072163"><span id="local-6989586621679072166"><span id="local-6989586621679072169"><span id="local-6989586621679072182"><span id="local-6989586621679072196"><span class="annot"><span class="annottext">Eq TimeLocale
Eq TimeLocale
-&gt; (TimeLocale -&gt; TimeLocale -&gt; Ordering)
-&gt; (TimeLocale -&gt; TimeLocale -&gt; Bool)
-&gt; (TimeLocale -&gt; TimeLocale -&gt; Bool)
-&gt; (TimeLocale -&gt; TimeLocale -&gt; Bool)
-&gt; (TimeLocale -&gt; TimeLocale -&gt; Bool)
-&gt; (TimeLocale -&gt; TimeLocale -&gt; TimeLocale)
-&gt; (TimeLocale -&gt; TimeLocale -&gt; TimeLocale)
-&gt; Ord TimeLocale
TimeLocale -&gt; TimeLocale -&gt; Bool
TimeLocale -&gt; TimeLocale -&gt; Ordering
TimeLocale -&gt; TimeLocale -&gt; TimeLocale
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: TimeLocale -&gt; TimeLocale -&gt; TimeLocale
$cmin :: TimeLocale -&gt; TimeLocale -&gt; TimeLocale
max :: TimeLocale -&gt; TimeLocale -&gt; TimeLocale
$cmax :: TimeLocale -&gt; TimeLocale -&gt; TimeLocale
&gt;= :: TimeLocale -&gt; TimeLocale -&gt; Bool
$c&gt;= :: TimeLocale -&gt; TimeLocale -&gt; Bool
&gt; :: TimeLocale -&gt; TimeLocale -&gt; Bool
$c&gt; :: TimeLocale -&gt; TimeLocale -&gt; Bool
&lt;= :: TimeLocale -&gt; TimeLocale -&gt; Bool
$c&lt;= :: TimeLocale -&gt; TimeLocale -&gt; Bool
&lt; :: TimeLocale -&gt; TimeLocale -&gt; Bool
$c&lt; :: TimeLocale -&gt; TimeLocale -&gt; Bool
compare :: TimeLocale -&gt; TimeLocale -&gt; Ordering
$ccompare :: TimeLocale -&gt; TimeLocale -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679072130"><span id="local-6989586621679072132"><span id="local-6989586621679072148"><span class="annot"><span class="annottext">Int -&gt; TimeLocale -&gt; ShowS
[TimeLocale] -&gt; ShowS
TimeLocale -&gt; String
(Int -&gt; TimeLocale -&gt; ShowS)
-&gt; (TimeLocale -&gt; String)
-&gt; ([TimeLocale] -&gt; ShowS)
-&gt; Show TimeLocale
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [TimeLocale] -&gt; ShowS
$cshowList :: [TimeLocale] -&gt; ShowS
show :: TimeLocale -&gt; String
$cshow :: TimeLocale -&gt; String
showsPrec :: Int -&gt; TimeLocale -&gt; ShowS
$cshowsPrec :: Int -&gt; TimeLocale -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-comment">-- | Locale representing American usage.</span><span>
</span><span id="line-32"></span><span class="hs-comment">--</span><span>
</span><span id="line-33"></span><span class="hs-comment">-- 'knownTimeZones' contains only the ten time-zones mentioned in RFC 822 sec. 5:</span><span>
</span><span id="line-34"></span><span class="hs-comment">-- \&quot;UT\&quot;, \&quot;GMT\&quot;, \&quot;EST\&quot;, \&quot;EDT\&quot;, \&quot;CST\&quot;, \&quot;CDT\&quot;, \&quot;MST\&quot;, \&quot;MDT\&quot;, \&quot;PST\&quot;, \&quot;PDT\&quot;.</span><span>
</span><span id="line-35"></span><span class="hs-comment">-- Note that the parsing functions will regardless parse \&quot;UTC\&quot;, single-letter military time-zones, and +HHMM format.</span><span>
</span><span id="line-36"></span><span class="annot"><a href="Data.Time.Format.Locale.html#defaultTimeLocale"><span class="hs-identifier hs-type">defaultTimeLocale</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Time.Format.Locale.html#TimeLocale"><span class="hs-identifier hs-type">TimeLocale</span></a></span><span>
</span><span id="line-37"></span><span id="defaultTimeLocale"><span class="annot"><span class="annottext">defaultTimeLocale :: TimeLocale
</span><a href="Data.Time.Format.Locale.html#defaultTimeLocale"><span class="hs-identifier hs-var hs-var">defaultTimeLocale</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">TimeLocale :: [(String, String)]
-&gt; [(String, String)]
-&gt; (String, String)
-&gt; String
-&gt; String
-&gt; String
-&gt; String
-&gt; [TimeZone]
-&gt; TimeLocale
</span><a href="Data.Time.Format.Locale.html#TimeLocale"><span class="hs-identifier hs-type">TimeLocale</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><span class="annottext">wDays :: [(String, String)]
</span><a href="Data.Time.Format.Locale.html#wDays"><span class="hs-identifier hs-var">wDays</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Sunday&quot;</span></span><span class="hs-special">,</span><span>   </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Sun&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Monday&quot;</span></span><span class="hs-special">,</span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Mon&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Tuesday&quot;</span></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Tue&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Wednesday&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Wed&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Thursday&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Thu&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Friday&quot;</span></span><span class="hs-special">,</span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Fri&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Saturday&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Sat&quot;</span></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span>        </span><span class="annot"><span class="annottext">months :: [(String, String)]
</span><a href="Data.Time.Format.Locale.html#months"><span class="hs-identifier hs-var">months</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;January&quot;</span></span><span class="hs-special">,</span><span>   </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Jan&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;February&quot;</span></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Feb&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;March&quot;</span></span><span class="hs-special">,</span><span>     </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Mar&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;April&quot;</span></span><span class="hs-special">,</span><span>     </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Apr&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-45"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;May&quot;</span></span><span class="hs-special">,</span><span>       </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;May&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;June&quot;</span></span><span class="hs-special">,</span><span>      </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Jun&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-46"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;July&quot;</span></span><span class="hs-special">,</span><span>      </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Jul&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;August&quot;</span></span><span class="hs-special">,</span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Aug&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;September&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Sep&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;October&quot;</span></span><span class="hs-special">,</span><span>   </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Oct&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-48"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;November&quot;</span></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Nov&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;December&quot;</span></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Dec&quot;</span></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span>        </span><span class="annot"><span class="annottext">amPm :: (String, String)
</span><a href="Data.Time.Format.Locale.html#amPm"><span class="hs-identifier hs-var">amPm</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;AM&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;PM&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-51"></span><span>        </span><span class="annot"><span class="annottext">dateTimeFmt :: String
</span><a href="Data.Time.Format.Locale.html#dateTimeFmt"><span class="hs-identifier hs-var">dateTimeFmt</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%a %b %e %H:%M:%S %Z %Y&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-52"></span><span>        </span><span class="annot"><span class="annottext">dateFmt :: String
</span><a href="Data.Time.Format.Locale.html#dateFmt"><span class="hs-identifier hs-var">dateFmt</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%m/%d/%y&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-53"></span><span>        </span><span class="annot"><span class="annottext">timeFmt :: String
</span><a href="Data.Time.Format.Locale.html#timeFmt"><span class="hs-identifier hs-var">timeFmt</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%H:%M:%S&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-54"></span><span>        </span><span class="annot"><span class="annottext">time12Fmt :: String
</span><a href="Data.Time.Format.Locale.html#time12Fmt"><span class="hs-identifier hs-var">time12Fmt</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%I:%M:%S %p&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-55"></span><span>        </span><span class="annot"><span class="annottext">knownTimeZones :: [TimeZone]
</span><a href="Data.Time.Format.Locale.html#knownTimeZones"><span class="hs-identifier hs-var">knownTimeZones</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-56"></span><span>            </span><span class="hs-special">[</span><span>
</span><span id="line-57"></span><span>            </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; String -&gt; TimeZone
</span><a href="Data.Time.LocalTime.Internal.TimeZone.html#TimeZone"><span class="hs-identifier hs-var">TimeZone</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UT&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-58"></span><span>            </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; String -&gt; TimeZone
</span><a href="Data.Time.LocalTime.Internal.TimeZone.html#TimeZone"><span class="hs-identifier hs-var">TimeZone</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GMT&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-59"></span><span>            </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; String -&gt; TimeZone
</span><a href="Data.Time.LocalTime.Internal.TimeZone.html#TimeZone"><span class="hs-identifier hs-var">TimeZone</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">5</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">60</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;EST&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-60"></span><span>            </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; String -&gt; TimeZone
</span><a href="Data.Time.LocalTime.Internal.TimeZone.html#TimeZone"><span class="hs-identifier hs-var">TimeZone</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">60</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;EDT&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-61"></span><span>            </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; String -&gt; TimeZone
</span><a href="Data.Time.LocalTime.Internal.TimeZone.html#TimeZone"><span class="hs-identifier hs-var">TimeZone</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">60</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CST&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-62"></span><span>            </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; String -&gt; TimeZone
</span><a href="Data.Time.LocalTime.Internal.TimeZone.html#TimeZone"><span class="hs-identifier hs-var">TimeZone</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">5</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">60</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CDT&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-63"></span><span>            </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; String -&gt; TimeZone
</span><a href="Data.Time.LocalTime.Internal.TimeZone.html#TimeZone"><span class="hs-identifier hs-var">TimeZone</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">60</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;MST&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-64"></span><span>            </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; String -&gt; TimeZone
</span><a href="Data.Time.LocalTime.Internal.TimeZone.html#TimeZone"><span class="hs-identifier hs-var">TimeZone</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">60</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;MDT&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-65"></span><span>            </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; String -&gt; TimeZone
</span><a href="Data.Time.LocalTime.Internal.TimeZone.html#TimeZone"><span class="hs-identifier hs-var">TimeZone</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">60</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;PST&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-66"></span><span>            </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; String -&gt; TimeZone
</span><a href="Data.Time.LocalTime.Internal.TimeZone.html#TimeZone"><span class="hs-identifier hs-var">TimeZone</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">60</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;PDT&quot;</span></span><span>
</span><span id="line-67"></span><span>            </span><span class="hs-special">]</span><span>
</span><span id="line-68"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span class="hs-comment">{- | Construct format string according to &lt;http://en.wikipedia.org/wiki/ISO_8601 ISO-8601&gt;.

The @Maybe String@ argument allows to supply an optional time specification. E.g.:

@
'iso8601DateFormat' Nothing            == &quot;%Y-%m-%d&quot;           -- i.e. @/YYYY-MM-DD/@
'iso8601DateFormat' (Just &quot;%H:%M:%S&quot;)  == &quot;%Y-%m-%dT%H:%M:%S&quot;  -- i.e. @/YYYY-MM-DD/T/HH:MM:SS/@
@
-}</span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span class="annot"><a href="Data.Time.Format.Locale.html#iso8601DateFormat"><span class="hs-identifier hs-type">iso8601DateFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-81"></span><span id="iso8601DateFormat"><span class="annot"><span class="annottext">iso8601DateFormat :: Maybe String -&gt; String
</span><a href="Data.Time.Format.Locale.html#iso8601DateFormat"><span class="hs-identifier hs-var hs-var">iso8601DateFormat</span></a></span></span><span> </span><span id="local-6989586621679072121"><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679072121"><span class="hs-identifier hs-var">mTimeFmt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-82"></span><span>    </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%Y-%m-%d&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679072121"><span class="hs-identifier hs-var">mTimeFmt</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-83"></span><span>             </span><span class="annot"><span class="annottext">Maybe String
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-84"></span><span>             </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679072120"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679072120"><span class="hs-identifier hs-var">fmt</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'T'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679072120"><span class="hs-identifier hs-var">fmt</span></a></span><span>
</span><span id="line-85"></span><span>
</span><span id="line-86"></span><span class="hs-comment">-- | Format string according to &lt;http://tools.ietf.org/html/rfc822#section-5 RFC822&gt;.</span><span>
</span><span id="line-87"></span><span class="annot"><a href="Data.Time.Format.Locale.html#rfc822DateFormat"><span class="hs-identifier hs-type">rfc822DateFormat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-88"></span><span id="rfc822DateFormat"><span class="annot"><span class="annottext">rfc822DateFormat :: String
</span><a href="Data.Time.Format.Locale.html#rfc822DateFormat"><span class="hs-identifier hs-var hs-var">rfc822DateFormat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;%a, %_d %b %Y %H:%M:%S %Z&quot;</span></span><span>
</span><span id="line-89"></span></pre></body></html>